﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UniversaleMain.Master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="FYPDemo.Register" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1 class="h1_title">Register</h1>
    <table>
        <tr>
            <td>
                <asp:Label ID="lblImage" runat="server" Text="Display Picture: "></asp:Label>
            </td>

            <td>
                <asp:Image ID="DisplayPicture" runat="server" Height="250px" Width="205px" />
                <br />
                <asp:FileUpload ID="FileUpload1" runat="server" />
            </td>
        </tr>

        <tr>
            <td>
            </td>
            <td>
                <asp:Button ID="btnUpload" runat="server" Text="Upload" 
                    onclick="btnUpload_Click" />
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" 
                    onclick="btnCancel_Click" />
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblName" runat="server" Text="Name: "></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ErrorMessage="Name must not be empty" ControlToValidate="txtName" 
                    ForeColor="Red" ValidationGroup="checkRegister"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblPassword" runat="server" Text="Password: "></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"  ForeColor="Red"
                ErrorMessage="Password must not be empty" ControlToValidate="txtPassword" 
                    ValidationGroup="checkRegister"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblConfirmPassword" runat="server" Text="Confirm Password: "></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"  ForeColor="Red"
                ErrorMessage="Confirm password must not be empty" 
                    ControlToValidate="txtConfirmPassword" Display="Dynamic" 
                    ValidationGroup="checkRegister"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidator1" runat="server" 
                ErrorMessage="Different with the password." Type="String"
                    ControlToValidate="txtConfirmPassword" ControlToCompare="txtPassword"
                    ForeColor="Red" Display="Dynamic" ValidationGroup="checkRegister"></asp:CompareValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblEmail" runat="server" Text="Email: "></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ForeColor="Red"
                ErrorMessage="Email must not be empty" ControlToValidate="txtEmail" 
                    ValidationGroup="checkRegister"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblPhone" runat="server" Text="Phone: "></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ForeColor="Red" 
                ErrorMessage="Phone number must not be empty" ControlToValidate="txtPhone" 
                    ValidationGroup="checkRegister"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblSecurityQuestion" runat="server" Text="Security Question"></asp:Label>
            </td>

            <td>
                <asp:DropDownList ID="ddlSecurityQuestion" runat="server"></asp:DropDownList>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblAnswer" runat="server" Text="Answer"></asp:Label>
            </td>

            <td>
                <asp:TextBox ID="txtAnswer" runat="server" ></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ForeColor="Red"
                ErrorMessage="Security Answer must not be empty" ControlToValidate="txtAnswer" 
                    ValidationGroup="checkRegister"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblCategory" runat="server" Text="Category: "></asp:Label>
            </td>

            <td>
                <asp:RadioButtonList ID="rbCategory" runat="server" 
                    RepeatDirection="Horizontal">
                    <asp:ListItem Selected="True" Value="2">Member</asp:ListItem>
                    <asp:ListItem Value="3">Supplier</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblAddress" runat="server" Text="Address "></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ForeColor="Red" 
                ErrorMessage="Address must not be empty" ControlToValidate="txtAddress" 
                    ValidationGroup="checkRegister"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblPostCode" runat="server" Text="PostCode" ></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtPostCode" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ForeColor="Red" 
                ErrorMessage="Postcode must not be empty" ControlToValidate="txtPostCode" 
                    ValidationGroup="checkRegister"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblState" runat="server" Text="State"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlState" runat="server"></asp:DropDownList>                
            </td>
        </tr>
        

        <tr>
            <td>                
            </td>
            <td>
                <div style="text-align:left; margin-top:10px;">
                        <asp:Button ID="btnRegister" runat="server" Text="Register" 
                            onclick="btnRegister_Click" ValidationGroup="checkRegister" CssClass="buttonbg" />
                    </div>
            </td>
        </tr>

    </table>
</asp:Content>
